package lab02.test06;

public class Circle {
    double radius;
    double perimeter;
    double area;
    double PI = Math.PI;

    public Circle(double radius) {
        this.radius = radius;
    }

    public void setPerimeter() {
        perimeter = radius * 2 * PI;
        System.out.println("圆的周长是：" + perimeter);
    }

    public void area() {
        area = radius * radius * PI;
        System.out.println("圆的面积是：" + area);
    }
}
